<template>
  <div class="detail_box">
    <div class="title">
      <div>{{form.title}}</div>
    </div>
    <el-form class="left_from" ref="form" :model="form"  label-width="80px" :disabled="true">
      <el-form-item label="标题" prop="title">
        <el-input v-model="form.title" placeholder="请输入标题" />
      </el-form-item>
      <el-form-item label="姓名" prop="publicName">
        <el-input v-model="form.publicName" placeholder="请输入提交人姓名" />
      </el-form-item>
      <el-row :gutter="24" type="flex" justify="space-between">
        <el-col :span="11">
          <el-form-item label="手机号" prop="photonumber">
            <el-input v-model="form.photonumber" placeholder="请输入手机号" />
          </el-form-item>
        </el-col>
        <el-col :span="11">
          <el-form-item label="属地" prop="area">
            <el-select style="width: 100%;" v-model="form.area" placeholder="请选择舆情属地">
              <el-option
                v-for="dict in dict.type.ps_possession"
                :key="dict.value"
                :label="dict.label"
                :value="parseInt(dict.value)"
              ></el-option>
            </el-select>
          </el-form-item>
        </el-col>
      </el-row>
      <el-form-item label="详细地址" prop="address">
        <el-input v-model="form.address" placeholder="请输入详细地址" />
      </el-form-item>
      <el-form-item  label="内容">
        <editor ref="editorSon" v-model="form.content" :min-height="192"/>
      </el-form-item>
    </el-form>
  </div>
</template>
<script>
import {getParticipation } from "@/api/participation/participation";

export default {
  name: "index",
  dicts: ['ps_possession'],
  data(){
    return{
      id:'',
      tableData: [],
      drawer: false,
      strategyList: [],
      title:'',
      publicName:'',
      photonumber:'',
      area:'',
      address:'',
      content:'',
      form: {},
    }
  },
  methods:{
    getList(id) {
      getParticipation(id).then(response => {
        this.form = response.data;
        this.$nextTick(()=>{
          this.$refs.editorSon.Quill.enable(false)
        })
      });
    },
  },
  created() {
    this.Id = this.$route.query.id
    this.getList(this.Id)
  }
}
</script>

<style scoped lang="scss">
.detail_box{
  width: 100%;
  height: calc(100vh - 86px);
  box-sizing: border-box;
  padding: 0 10%;
  overflow-y: auto;
  padding-top: 30px;
  position: relative;
}
.title {
  width: 100%;
  display: flex;
  justify-content: center;
  font-size: 22px;
  color: #333;
  font-weight: 600;
  margin-bottom: 40px;

  div {
    max-width: 70%;
    overflow: hidden; //超出的文本隐藏
    text-overflow: ellipsis; //用省略号显示
    white-space: nowrap; //不换行
    margin-right: 20px;
  }
}
</style>
